A. Technical Field
The present invention relates to video encoding, and in particular, to the selection of a quantization parameter for an I-frame based on a global edge strength value of the frame and an available bitrate for its corresponding compressed frame.
B. Background of the Invention
Video images are compressed to reduce the bandwidth needed for transmission via broadcast services, wireless systems, internet or local area network. Transmission is implemented in a way such that a balance is managed between the quality of compression for a particular frame and the amount of bits used to compress the frame.
One factor that determines the bit size of a compressed video frame is a lossy quantization process that reduces the amount of data used to encode the original representation. A set of quantization parameters define how the quantization process is performed and the amount of data lost during the procedure. The latest international video codec standard H.264 or MPEG-4 provides 52 sets of quantization parameters, each associated with different visual quality and frame size.
Transmission rate control is used in a video encoding system which normally comprises three major functional blocks: a reference decoder, a parameter selector, and a video encoder. The reference decoder receives feedback from the encoder and constrains the bitrate according to the status of the decoder buffer. The incoming frame is compressed to a preferred size so that the frame is transmitted at the specified bitrate without causing buffer overflow or underflow. Consequently, given a target frame size, a parameter selector is needed to select a proper quantization parameter set from the list of quantization parameters identified by the video codec standard in use. Since the frames sizes associated with the available quantization parameters are discrete values, the selected quantization parameters set may only lead to a preferred frame size not exceeding the allowed size. An error in quantization parameters selection may result in an undesirable number of bits of a video frame being encoded and may cause a buffer overflow or underflow.
A typical method in selecting quantization parameters is to extrapolate the quantization parameters for the current frame from a previously encoded frame(s); however, the underlying assumption that the current and previous frames share the same complexity may induce a high probability of error. Such error may be accommodated by the reference decoder if no significant scene change is involved. However, even without any scene change, an increase in content complexity may still produce estimation error for an intra frame (I-Frame). Moreover, in real time encoding applications, the encoder is restricted to run only a single pass (frame).
Accordingly, what is needed is a system and method that addresses the above described shortcomings in the prior art.